/*************************************************************************
    > File Name: test.c
    > Author: ma6174
    > Mail: ma6174@163.com 
    > Created Time: Tue 04 Mar 2025 10:19:12 PM CST
 ************************************************************************/

#include<stdio.h>
#include<string.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>

int main()
{
	umask(0);
	int fd = open("log.txt",O_WRONLY | O_CREAT,0666);
	if(fd<0)
	{
		perror("open faied!");
		return 1;
	}
	return 0;
}
